<div class="dialog_inner">
  <div>
    <form action="ajax.php" id="force" name="force" method="post">
      <table>
        <tr>
          <td>物流公司：</td>
          <td>
            <select class="form-control" id="logisticsname" name="logisticsname">
                <option value="">请选择</option>
                <!--{loop $express $key $val}-->
                <option value="{$key}">{$val}</option>
                <!--{/loop}-->
            </select>
          </td>
        </tr>
        <tr>
          <td>快递单号：</td>
          <td>
            <input type="text" id="logisticsid" name="logisticsid" value="{$logisticsid}">
          </td>
        </tr>
        <tr>
          <td colspan="2">
              <input type="hidden" id="oid" name="oid" value="{$oid}" />
            <input class="u-btn" type="button" name="Submit" onclick="do_deliver_goods();" value="提 交">
            <input class="u-btn u-btn-c4" type="button" name="docancel" onclick="closeDialog('{$this->Get['handle_key']}');" value="取 消">
          </td>
        </tr>
      </table>
    </form>
  </div>
</div>

<script type="text/javascript">	
function do_deliver_goods(){
  var logisticsname = document.getElementById('logisticsname').value;
  var logisticsid = document.getElementById('logisticsid').value;
  if(logisticsname == ''){
      show_message('请选择物流公司');
      document.getElementById('logisticsname').focus();
      return false;
  }
  if(logisticsid == ''){
      show_message('请输入快递单号');
      document.getElementById('logisticsid').focus();
      return false;
  }
  var oid = document.getElementById('oid').value;
  $.get("ajax.php?mod=mall&code=ordership",{'oid':oid,'logisticsname':logisticsname,'logisticsid':logisticsid},function(json){
        if(json.done){
                alert(json.msg);
                window.location.reload();
        }else{
                alert(json.msg);
        }
    },'json');
    return false;
}

</script>